+ function() {
	remLayout();

	function remLayout() {
		var w = document.documentElement.clientWidth;
		w = w > 750 ? 750 : w;
		w = w <= 320 ? 320 : w;
		document.documentElement.style.fontSize = w / 7.5 + 'px';
	}
	window.addEventListener('resize',
		function() {
			remLayout();
		},
		false);
}();
function toTop(){
	var scrollToptimer = setInterval(function () {
	    var top = document.body.scrollTop || document.documentElement.scrollTop;
	    var speed = top / 4;
	    if (document.body.scrollTop!=0) {
	        document.body.scrollTop -= speed;
	    }else {
	        document.documentElement.scrollTop -= speed;
	    }
	    if (top == 0) {
	        clearInterval(scrollToptimer);
	    }
	}, 30);
}

function getScrollTop() {
	var scrollPos;
	if (window.pageYOffset)
	{
		scrollPos = window.pageYOffset;
	}
	else if (document.compatMode && document.compatMode != 'BackCompat')
	{
		scrollPos = document.documentElement.scrollTop;
	}
	else if (document.body)
	{
		scrollPos = document.body.scrollTop;
	}
	return scrollPos;
}

window.onscroll = function () {//监听滚动条
	if (getScrollTop() > 300) {//当滚动条离开顶端时，显示"回到顶部"。这里写20的原因是，"回到顶端"按钮也不是需要马上出现，根据自己的需求 而设置。
		$(".footWrap .toTop").show();
	}
	else {//当滚动条回到顶端时，将"回到顶端按钮"  隐藏
		$(".footWrap .toTop").hide();
	}
}

let startX,endX;
let lunbo=$('#carousel-example-generic1 .carousel-inner')[0]
let carousel=$('#carousel-example-generic1')
lunbo.addEventListener('touchstart',function(e){
	startX=e.targetTouches[0].clientX
})
lunbo.addEventListener('touchend',function(e){
	endX=e.changedTouches[0].clientX
	if(startX<endX){
		carousel.carousel('prev')
	}else if(startX>endX){
		carousel.carousel('next')
	}
})